<template>
  <div class="navclass">
    <el-menu
      @select="sel"
      default-active="6"
      background-color="#29363D"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-submenu index="0">
        <template slot="title">
          <i class="el-icon-s-order"></i>
          <span>我的工作</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1">兑现审批</el-menu-item>
          <el-menu-item index="2">综合统计</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="3">
        <i class="el-icon-chat-dot-round"></i>
        <span slot="title">我的通讯录</span>
      </el-menu-item>
      <el-menu-item index="4">
        <i class="el-icon-message"></i>
        <span slot="title">内部邮件</span>
      </el-menu-item>

      <el-menu-item index="5">
        <i class="el-icon-setting"></i>
        <span slot="title">个人设置</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  methods: {
    sel(e){
      switch (e) {
        case '1':
          this.$router.push(
            {
              name:'approval'
            }
          ).catch(err=>{console.log(err);})
          break;
        case '2':
          this.$router.push(
            {
              name:'query'
            }
          ).catch(err=>{console.log(err);})
          break;
        case '3':
          this.$router.push(
            {
              name:'address'
            }
          ).catch(err=>{console.log(err);})
          break;
        case '4':
          this.$router.push(
            {
              name:'email'
            }
          ).catch(err=>{console.log(err);})
          break;

        case '5':
          this.$router.push(
            {
              name:'setting'
            }
          ).catch(err=>{console.log(err);})
          break;
      
        default:
          break;
      }
    }
  },
  created() {
    this.$router.push({
      name:"setting",

    }).catch(err=>{console.log(err);})
  },
};
</script>

<style >
.navclass {
  width: 100%;
  height: 92vh;
  background: #29363d;
}
.navclass .el-menu {
  border: 0px;
}
</style>